package demo.helloworld.service;

import act.db.ebean.EbeanDao;
import demo.helloworld.model.Comments;
import demo.helloworld.model.Logs;

import javax.inject.Inject;
import java.util.List;

/**
 * Created by vilen on 2017/3/1.
 */
public class LogService {
    @Inject
    private EbeanDao<Integer, Comments> dao;

    public List<Logs> getLogs(int page, int limit) {
        return dao.ebean().find(Logs.class).setFirstRow((page - 1) * limit).setMaxRows(limit).findList();
    }
}
